package com.yazi.mxz.mobile.common;


import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.SimpleAuthenticationInfo;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.subject.PrincipalCollection;

import com.yazi.mxz.common.AbstractRealm;
import com.yazi.mxz.common.entity.beans.Member;

/**
 * 
 * 
 * @author mo_yq5@163.com
 * @date 2013-11-22
 * 
 */
public class Realm extends AbstractRealm {
	
	@Override
	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0) {
		
		SimpleAuthorizationInfo autho = new SimpleAuthorizationInfo();
		
		return autho;
	}

	@Override
	public AuthenticationInfo getMyAuthenticationInfo(Member member, String password) {
		return new SimpleAuthenticationInfo(member.getMemberId(), password, Realm.class.getName());
	}

}
